﻿@using KRM.Core
@model List<KRM.Core.OrderInfo>
<div class="row-fluid">@Html.Partial("Partial/_MessageResult")
</div>
<input type="hidden" id="HasOrderErr" value="@(Model.Any(p=>p.CommentBackColor.Name!="Red")?1:0)"/>
<div class="medium-scroll fix-head row-fluid">
        <table class="table table-bordered table-fix">
            <thead>
                <tr>
                    <th>Comments</th>
                    <th>Trade Account PORef</th>
                    <th>Trade Account OrderRef</th>
                    <th>Trade Order Date</th>
                    <th>Kybo OrderRef</th> 
                    <th>Product Code</th> 
                    <th>Product Name</th>
                    <th>Surname</th>
                    <th>Address1</th>
                    <th>Postcode</th>
                    <th>Telephone1</th>
                    <th>Telephone2</th>
                    <th>Email</th>
                </tr></thead>
            <tbody>
                @foreach (OrderInfo item in Model)
                {
                    <tr style="background: @item.FullRowBackColor.Name">
                        <td style="background: @item.CommentBackColor.Name; color: @(item.CommentBackColor.Name=="Red"?"White":"")">@item.Comment</td>
                        <td>@item.OrderNumber</td>
                        <td>@item.TradeOrderNumber</td>
                        <td>@item.DatePlaced</td>
                        <td>@item.OrderRef</td> 
                        <td>@item.ProductCode</td> 
                        <td>@item.ProductDescription</td>
                        <td>@item.LastName</td>
                        <td>@item.DeliveryAddress1</td>
                        <td>@item.PostCode</td>
                        <td>@item.DeliveryTelephoneNumber</td>
                        <td>@item.BillingTelephoneNumber</td>
                        <td>@item.Email</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>